Integrand size = 18, antiderivative size = 157 \[ \int f^{a+b x} \sin ^2\left (d+f x^2\right ) \, dx=\left (\frac {1}{16}+\frac {i}{16}\right ) e^{2 i d+\frac {i b^2 \log ^2(f)}{8 f}} f^{-\frac {1}{2}+a} \sqrt {\pi } \text {erf}\left (\frac {\left (\frac {1}{4}+\frac {i}{4}\right ) (4 i f x+b \log (f))}{\sqrt {f}}\right )+\left (\frac {1}{16}+\frac {i}{16}\right ) e^{-\frac {1}{8} i \left (16 d+\frac {b^2 \log ^2(f)}{f}\right )} f^{-\frac {1}{2}+a} \sqrt {\pi } \text {erfi}\left (\frac {\left (\frac {1}{4}+\frac {i}{4}\right ) (4 i f x-b \log (f))}{\sqrt {f}}\right )+\frac {f^{a+b x}}{2 b \log (f)} \]
1/2*f^(b*x+a)/b/ln(f)+(1/16+1/16*I)*exp(2*I*d+1/8*I*b^2*ln(f)^2/f)*f^(-1/2 +a)*erf((1/4+1/4*I)*(4*I*f*x+b*ln(f))/f^(1/2))*Pi^(1/2)+(1/16+1/16*I)*f^(- 1/2+a)*erfi((1/4+1/4*I)*(4*I*f*x-b*ln(f))/f^(1/2))*Pi^(1/2)/exp(1/8*I*(16* d+b^2*ln(f)^2/f))
Time = 0.88 (sec) , antiderivative size = 156, normalized size of antiderivative = 0.99 \[ \int f^{a+b x} \sin ^2\left (d+f x^2\right ) \, dx=\frac {1}{16} f^a \left (\frac {8 f^{b x}}{b \log (f)}-\frac {(1-i) e^{-\frac {i b^2 \log ^2(f)}{8 f}} \sqrt {\pi } \text {erf}\left (\frac {(4+4 i) f x-(1-i) b \log (f)}{4 \sqrt {f}}\right ) (\cos (d)-i \sin (d))^2}{\sqrt {f}}-\frac {(1-i) e^{\frac {i b^2 \log ^2(f)}{8 f}} \sqrt {\pi } \text {erfi}\left (\frac {(4+4 i) f x+(1-i) b \log (f)}{4 \sqrt {f}}\right ) (\cos (d)+i \sin (d))^2}{\sqrt {f}}\right ) \]
(f^a*((8*f^(b*x))/(b*Log[f]) - ((1 - I)*Sqrt[Pi]*Erf[((4 + 4*I)*f*x - (1 - I)*b*Log[f])/(4*Sqrt[f])]*(Cos[d] - I*Sin[d])^2)/(E^(((I/8)*b^2*Log[f]^2) /f)*Sqrt[f]) - ((1 - I)*E^(((I/8)*b^2*Log[f]^2)/f)*Sqrt[Pi]*Erfi[((4 + 4*I )*f*x + (1 - I)*b*Log[f])/(4*Sqrt[f])]*(Cos[d] + I*Sin[d])^2)/Sqrt[f]))/16
Time = 0.37 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {4975, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int f^{a+b x} \sin ^2\left (d+f x^2\right ) \, dx\) |
\(\Big \downarrow \) 4975 |
\(\displaystyle \int \left (-\frac {1}{4} e^{-2 i d-2 i f x^2} f^{a+b x}-\frac {1}{4} e^{2 i d+2 i f x^2} f^{a+b x}+\frac {1}{2} f^{a+b x}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \left (\frac {1}{16}+\frac {i}{16}\right ) \sqrt {\pi } f^{a-\frac {1}{2}} e^{\frac {i b^2 \log ^2(f)}{8 f}+2 i d} \text {erf}\left (\frac {\left (\frac {1}{4}+\frac {i}{4}\right ) (b \log (f)+4 i f x)}{\sqrt {f}}\right )+\left (\frac {1}{16}+\frac {i}{16}\right ) \sqrt {\pi } f^{a-\frac {1}{2}} e^{-\frac {1}{8} i \left (\frac {b^2 \log ^2(f)}{f}+16 d\right )} \text {erfi}\left (\frac {\left (\frac {1}{4}+\frac {i}{4}\right ) (-b \log (f)+4 i f x)}{\sqrt {f}}\right )+\frac {f^{a+b x}}{2 b \log (f)}\) |
(1/16 + I/16)*E^((2*I)*d + ((I/8)*b^2*Log[f]^2)/f)*f^(-1/2 + a)*Sqrt[Pi]*E rf[((1/4 + I/4)*((4*I)*f*x + b*Log[f]))/Sqrt[f]] + ((1/16 + I/16)*f^(-1/2 + a)*Sqrt[Pi]*Erfi[((1/4 + I/4)*((4*I)*f*x - b*Log[f]))/Sqrt[f]])/E^((I/8) *(16*d + (b^2*Log[f]^2)/f)) + f^(a + b*x)/(2*b*Log[f])
3.1.80.3.1 Defintions of rubi rules used
Int[(F_)^(u_)*Sin[v_]^(n_.), x_Symbol] :> Int[ExpandTrigToExp[F^u, Sin[v]^n , x], x] /; FreeQ[F, x] && (LinearQ[u, x] || PolyQ[u, x, 2]) && (LinearQ[v, x] || PolyQ[v, x, 2]) && IGtQ[n, 0]
Time = 0.81 (sec) , antiderivative size = 139, normalized size of antiderivative = 0.89
method | result | size |
risch | \(\frac {\sqrt {\pi }\, f^{a} {\mathrm e}^{-\frac {i \left (\ln \left (f \right )^{2} b^{2}+16 d f \right )}{8 f}} \sqrt {2}\, \operatorname {erf}\left (-\sqrt {2}\, \sqrt {i f}\, x +\frac {b \ln \left (f \right ) \sqrt {2}}{4 \sqrt {i f}}\right )}{16 \sqrt {i f}}+\frac {\sqrt {\pi }\, f^{a} {\mathrm e}^{\frac {i \left (\ln \left (f \right )^{2} b^{2}+16 d f \right )}{8 f}} \operatorname {erf}\left (-\sqrt {-2 i f}\, x +\frac {b \ln \left (f \right )}{2 \sqrt {-2 i f}}\right )}{8 \sqrt {-2 i f}}+\frac {f^{x b +a}}{2 b \ln \left (f \right )}\) | \(139\) |
1/16*Pi^(1/2)*f^a*exp(-1/8*I*(ln(f)^2*b^2+16*d*f)/f)*2^(1/2)/(I*f)^(1/2)*e rf(-2^(1/2)*(I*f)^(1/2)*x+1/4*b*ln(f)*2^(1/2)/(I*f)^(1/2))+1/8*Pi^(1/2)*f^ a*exp(1/8*I*(ln(f)^2*b^2+16*d*f)/f)/(-2*I*f)^(1/2)*erf(-(-2*I*f)^(1/2)*x+1 /2*b*ln(f)/(-2*I*f)^(1/2))+1/2*f^(b*x+a)/b/ln(f)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 270 vs. \(2 (103) = 206\).
Time = 0.25 (sec) , antiderivative size = 270, normalized size of antiderivative = 1.72 \[ \int f^{a+b x} \sin ^2\left (d+f x^2\right ) \, dx=-\frac {\pi b \sqrt {\frac {f}{\pi }} e^{\left (\frac {-i \, b^{2} \log \left (f\right )^{2} + 8 \, a f \log \left (f\right ) - 16 i \, d f}{8 \, f}\right )} \operatorname {C}\left (\frac {{\left (4 \, f x + i \, b \log \left (f\right )\right )} \sqrt {\frac {f}{\pi }}}{2 \, f}\right ) \log \left (f\right ) - \pi b \sqrt {\frac {f}{\pi }} e^{\left (\frac {i \, b^{2} \log \left (f\right )^{2} + 8 \, a f \log \left (f\right ) + 16 i \, d f}{8 \, f}\right )} \operatorname {C}\left (-\frac {{\left (4 \, f x - i \, b \log \left (f\right )\right )} \sqrt {\frac {f}{\pi }}}{2 \, f}\right ) \log \left (f\right ) - i \, \pi b \sqrt {\frac {f}{\pi }} e^{\left (\frac {-i \, b^{2} \log \left (f\right )^{2} + 8 \, a f \log \left (f\right ) - 16 i \, d f}{8 \, f}\right )} \operatorname {S}\left (\frac {{\left (4 \, f x + i \, b \log \left (f\right )\right )} \sqrt {\frac {f}{\pi }}}{2 \, f}\right ) \log \left (f\right ) - i \, \pi b \sqrt {\frac {f}{\pi }} e^{\left (\frac {i \, b^{2} \log \left (f\right )^{2} + 8 \, a f \log \left (f\right ) + 16 i \, d f}{8 \, f}\right )} \operatorname {S}\left (-\frac {{\left (4 \, f x - i \, b \log \left (f\right )\right )} \sqrt {\frac {f}{\pi }}}{2 \, f}\right ) \log \left (f\right ) - 4 \, f f^{b x + a}}{8 \, b f \log \left (f\right )} \]
-1/8*(pi*b*sqrt(f/pi)*e^(1/8*(-I*b^2*log(f)^2 + 8*a*f*log(f) - 16*I*d*f)/f )*fresnel_cos(1/2*(4*f*x + I*b*log(f))*sqrt(f/pi)/f)*log(f) - pi*b*sqrt(f/ pi)*e^(1/8*(I*b^2*log(f)^2 + 8*a*f*log(f) + 16*I*d*f)/f)*fresnel_cos(-1/2* (4*f*x - I*b*log(f))*sqrt(f/pi)/f)*log(f) - I*pi*b*sqrt(f/pi)*e^(1/8*(-I*b ^2*log(f)^2 + 8*a*f*log(f) - 16*I*d*f)/f)*fresnel_sin(1/2*(4*f*x + I*b*log (f))*sqrt(f/pi)/f)*log(f) - I*pi*b*sqrt(f/pi)*e^(1/8*(I*b^2*log(f)^2 + 8*a *f*log(f) + 16*I*d*f)/f)*fresnel_sin(-1/2*(4*f*x - I*b*log(f))*sqrt(f/pi)/ f)*log(f) - 4*f*f^(b*x + a))/(b*f*log(f))
\[ \int f^{a+b x} \sin ^2\left (d+f x^2\right ) \, dx=\int f^{a + b x} \sin ^{2}{\left (d + f x^{2} \right )}\, dx \]
Time = 0.30 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.18 \[ \int f^{a+b x} \sin ^2\left (d+f x^2\right ) \, dx=\frac {4^{\frac {1}{4}} \sqrt {2} \sqrt {\pi } {\left ({\left (\left (i - 1\right ) \, b f^{a} \cos \left (\frac {b^{2} \log \left (f\right )^{2} + 16 \, d f}{8 \, f}\right ) \log \left (f\right ) + \left (i + 1\right ) \, b f^{a} \log \left (f\right ) \sin \left (\frac {b^{2} \log \left (f\right )^{2} + 16 \, d f}{8 \, f}\right )\right )} \operatorname {erf}\left (\frac {4 i \, f x - b \log \left (f\right )}{2 \, \sqrt {2 i \, f}}\right ) + {\left (\left (i + 1\right ) \, b f^{a} \cos \left (\frac {b^{2} \log \left (f\right )^{2} + 16 \, d f}{8 \, f}\right ) \log \left (f\right ) + \left (i - 1\right ) \, b f^{a} \log \left (f\right ) \sin \left (\frac {b^{2} \log \left (f\right )^{2} + 16 \, d f}{8 \, f}\right )\right )} \operatorname {erf}\left (\frac {4 i \, f x + b \log \left (f\right )}{2 \, \sqrt {-2 i \, f}}\right )\right )} f^{\frac {3}{2}} + 16 \, f^{b x} f^{a + 2}}{32 \, b f^{2} \log \left (f\right )} \]
1/32*(4^(1/4)*sqrt(2)*sqrt(pi)*(((I - 1)*b*f^a*cos(1/8*(b^2*log(f)^2 + 16* d*f)/f)*log(f) + (I + 1)*b*f^a*log(f)*sin(1/8*(b^2*log(f)^2 + 16*d*f)/f))* erf(1/2*(4*I*f*x - b*log(f))/sqrt(2*I*f)) + ((I + 1)*b*f^a*cos(1/8*(b^2*lo g(f)^2 + 16*d*f)/f)*log(f) + (I - 1)*b*f^a*log(f)*sin(1/8*(b^2*log(f)^2 + 16*d*f)/f))*erf(1/2*(4*I*f*x + b*log(f))/sqrt(-2*I*f)))*f^(3/2) + 16*f^(b* x)*f^(a + 2))/(b*f^2*log(f))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 521 vs. \(2 (103) = 206\).
Time = 0.32 (sec) , antiderivative size = 521, normalized size of antiderivative = 3.32 \[ \int f^{a+b x} \sin ^2\left (d+f x^2\right ) \, dx=\text {Too large to display} \]
(2*b*cos(-1/2*pi*b*x*sgn(f) + 1/2*pi*b*x - 1/2*pi*a*sgn(f) + 1/2*pi*a)*log (abs(f))/(4*b^2*log(abs(f))^2 + (pi*b*sgn(f) - pi*b)^2) - (pi*b*sgn(f) - p i*b)*sin(-1/2*pi*b*x*sgn(f) + 1/2*pi*b*x - 1/2*pi*a*sgn(f) + 1/2*pi*a)/(4* b^2*log(abs(f))^2 + (pi*b*sgn(f) - pi*b)^2))*e^(b*x*log(abs(f)) + a*log(ab s(f))) + I*(I*e^(1/2*I*pi*b*x*sgn(f) - 1/2*I*pi*b*x + 1/2*I*pi*a*sgn(f) - 1/2*I*pi*a)/(2*I*pi*b*sgn(f) - 2*I*pi*b + 4*b*log(abs(f))) - I*e^(-1/2*I*p i*b*x*sgn(f) + 1/2*I*pi*b*x - 1/2*I*pi*a*sgn(f) + 1/2*I*pi*a)/(-2*I*pi*b*s gn(f) + 2*I*pi*b + 4*b*log(abs(f))))*e^(b*x*log(abs(f)) + a*log(abs(f))) - 1/8*I*sqrt(pi)*erf(-1/8*I*sqrt(f)*(8*x - (pi*b*sgn(f) - pi*b + 2*I*b*log( abs(f)))/f)*(I*f/abs(f) + 1))*e^(1/16*I*pi^2*b^2*sgn(f)/f + 1/8*pi*b^2*log (abs(f))*sgn(f)/f - 1/16*I*pi^2*b^2/f - 1/8*pi*b^2*log(abs(f))/f + 1/8*I*b ^2*log(abs(f))^2/f - 1/2*I*pi*a*sgn(f) + 1/2*I*pi*a + a*log(abs(f)) + 2*I* d)/(sqrt(f)*(I*f/abs(f) + 1)) + 1/8*I*sqrt(pi)*erf(1/8*I*sqrt(f)*(8*x + (p i*b*sgn(f) - pi*b + 2*I*b*log(abs(f)))/f)*(-I*f/abs(f) + 1))*e^(-1/16*I*pi ^2*b^2*sgn(f)/f - 1/8*pi*b^2*log(abs(f))*sgn(f)/f + 1/16*I*pi^2*b^2/f + 1/ 8*pi*b^2*log(abs(f))/f - 1/8*I*b^2*log(abs(f))^2/f - 1/2*I*pi*a*sgn(f) + 1 /2*I*pi*a + a*log(abs(f)) - 2*I*d)/(sqrt(f)*(-I*f/abs(f) + 1))
Timed out. \[ \int f^{a+b x} \sin ^2\left (d+f x^2\right ) \, dx=\int f^{a+b\,x}\,{\sin \left (f\,x^2+d\right )}^2 \,d x \]